<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.net.ServerSocket</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.net.ServerSocket");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/ServerSocket.d?rev=3461">tango.net.ServerSocket</a></h1>
                
<b>License:</b><br>
BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a><br><br>
<b>Version:</b><br>
Initial release: March 2004      
                        Outback release: December 2006<br><br>
<b>author:</b><br>Kris<br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/ServerSocket.d?rev=3461#L36">ServerSocket</a></span>
<script>explorer.outline.addDecl('ServerSocket');</script> : ISelectable;</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">ServerSocket is a wrapper upon the basic socket functionality to
        simplify the API somewhat. You use a ServerSocket to listen for 
        inbound connection requests, and get back a SocketConduit when a
        connection is made.</font><br><br>
<font color="black">Accepted SocketConduit instances are held in a free-list to help
        avoid heap activity. These instances are recycled upon invoking
        the close&#40;&#41; method, and one should ensure that occurs<br><br></font><br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/ServerSocket.d?rev=3461#L52">this</a></span>
<script>explorer.outline.addDecl('this');</script>(InternetAddress <span class="funcparam">addr</span>, int <span class="funcparam">backlog</span> = 32, bool <span class="funcparam">reuse</span> = false);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Construct a ServerSocket on the given address, with the
                specified number of backlog connections supported. The
                socket is bound to the given address, and set to listen
                for incoming connections. Note that the socket address 
                can be setup for reuse, so that a halted server may be 
                restarted immediately.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>Handle <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/ServerSocket.d?rev=3461#L67">fileHandle</a></span>
<script>explorer.outline.addDecl('fileHandle');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Models a handle-oriented device.</font><br><br>
<b>TODO:</b><br>figure out how to avoid exposing this in the general
                case<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/ServerSocket.d?rev=3461#L79">setLingerPeriod</a></span>
<script>explorer.outline.addDecl('setLingerPeriod');</script>(int <span class="funcparam">period</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Set the period in which dead sockets are left lying around
                by the O/S</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>Socket <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/ServerSocket.d?rev=3461#L90">socket</a></span>
<script>explorer.outline.addDecl('socket');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return the wrapped socket</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/ServerSocket.d?rev=3461#L101">isAlive</a></span>
<script>explorer.outline.addDecl('isAlive');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Is this server still alive?</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>SocketConduit <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/ServerSocket.d?rev=3461#L113">create</a></span>
<script>explorer.outline.addDecl('create');</script>(); [protected]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Produce a SocketConduit instance. This can be overridden
                to return SocketConduit derivatives  </font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>SocketConduit <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/ServerSocket.d?rev=3461#L125">accept</a></span>
<script>explorer.outline.addDecl('accept');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Wait for a client to connect to us, and return a connected
                SocketConduit.</font><br><br></dd></dl></dd></dl></td></tr>
                <tr><td id="docfooter">
                        Copyright (c) 2004 Kris Bell. All rights reserved :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Sun Jun  8 17:12:55 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>